package video

import (
	"context"
	"srv/config"
	"srv/internal/model/dao"
	__ "srv/proto"
)

// 实现方法
func (s *UserService) UserInfo(ctx context.Context, req *__.UserInfoRequest) (resp *__.UserInfoReply, err error) {
	var user dao.User
	config.DB.Where("user_name=? or id =?", req.UserName, req.UserId).Limit(1).Find(&user)
	return &__.UserInfoReply{
		UserName:   user.UserName,
		FenPeople:  int64(user.FenPeople),
		Sign:       user.Sign,
		LikePeople: int64(user.LikePeople),
	}, nil
}
